#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
RESOURCES="$DIR/../Resources/automator"
LOG_DIR="$HOME/Library/Logs/GluesyncAutomator"
mkdir -p "$LOG_DIR"
LOG_FILE="$LOG_DIR/automator.log"

# Run the app in foreground so it shows in dock
# Redirect output to log file but keep process alive
exec "$RESOURCES/gluesync-automator-macos" "$@" > "$LOG_FILE" 2>&1
